{"ast":null,"code":"import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectSpread from \"@babel/runtime/helpers/esm/objectSpread2\";\nimport * as React from 'react';\nimport CSSMotion from 'rc-motion';\nimport classNames from 'classnames';\nvar MobilePopupInner = /*#__PURE__*/React.forwardRef(function (props, ref) {\n  var prefixCls = props.prefixCls,\n    visible = props.visible,\n    zIndex = props.zIndex,\n    children = props.children,\n    _props$mobile = props.mobile;\n  _props$mobile = _props$mobile === void 0 ? {} : _props$mobile;\n  var popupClassName = _props$mobile.popupClassName,\n    popupStyle = _props$mobile.popupStyle,\n    _props$mobile$popupMo = _props$mobile.popupMotion,\n    popupMotion = _props$mobile$popupMo === void 0 ? {} : _props$mobile$popupMo,\n    popupRender = _props$mobile.popupRender,\n    onClick = props.onClick;\n  var elementRef = React.useRef(); // ========================= Refs =========================\n\n  React.useImperativeHandle(ref, function () {\n    return {\n      forceAlign: function forceAlign() {},\n      getElement: function getElement() {\n        return elementRef.current;\n      }\n    };\n  }); // ======================== Render ========================\n\n  var mergedStyle = _objectSpread({\n    zIndex: zIndex\n  }, popupStyle);\n  var childNode = children; // Wrapper when multiple children\n\n  if (React.Children.count(children) > 1) {\n    childNode = /*#__PURE__*/React.createElement(\"div\", {\n      className: \"\".concat(prefixCls, \"-content\")\n    }, children);\n  } // Mobile support additional render\n\n  if (popupRender) {\n    childNode = popupRender(childNode);\n  }\n  return /*#__PURE__*/React.createElement(CSSMotion, _extends({\n    visible: visible,\n    ref: elementRef,\n    removeOnLeave: true\n  }, popupMotion), function (_ref, motionRef) {\n    var motionClassName = _ref.className,\n      motionStyle = _ref.style;\n    var mergedClassName = classNames(prefixCls, popupClassName, motionClassName);\n    return /*#__PURE__*/React.createElement(\"div\", {\n      ref: motionRef,\n      className: mergedClassName,\n      onClick: onClick,\n      style: _objectSpread(_objectSpread({}, motionStyle), mergedStyle)\n    }, childNode);\n  });\n});\nMobilePopupInner.displayName = 'MobilePopupInner';\nexport default MobilePopupInner;","map":{"version":3,"names":["_extends","_objectSpread","React","CSSMotion","classNames","MobilePopupInner","forwardRef","props","ref","prefixCls","visible","zIndex","children","_props$mobile","mobile","popupClassName","popupStyle","_props$mobile$popupMo","popupMotion","popupRender","onClick","elementRef","useRef","useImperativeHandle","forceAlign","getElement","current","mergedStyle","childNode","Children","count","createElement","className","concat","removeOnLeave","_ref","motionRef","motionClassName","motionStyle","style","mergedClassName","displayName"],"sources":["/Users/poppie/Desktop/development/messenger/app/frontend/node_modules/rc-trigger/es/Popup/MobilePopupInner.js"],"sourcesContent":["import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectSpread from \"@babel/runtime/helpers/esm/objectSpread2\";\nimport * as React from 'react';\nimport CSSMotion from 'rc-motion';\nimport classNames from 'classnames';\nvar MobilePopupInner = /*#__PURE__*/React.forwardRef(function (props, ref) {\n  var prefixCls = props.prefixCls,\n      visible = props.visible,\n      zIndex = props.zIndex,\n      children = props.children,\n      _props$mobile = props.mobile;\n  _props$mobile = _props$mobile === void 0 ? {} : _props$mobile;\n  var popupClassName = _props$mobile.popupClassName,\n      popupStyle = _props$mobile.popupStyle,\n      _props$mobile$popupMo = _props$mobile.popupMotion,\n      popupMotion = _props$mobile$popupMo === void 0 ? {} : _props$mobile$popupMo,\n      popupRender = _props$mobile.popupRender,\n      onClick = props.onClick;\n  var elementRef = React.useRef(); // ========================= Refs =========================\n\n  React.useImperativeHandle(ref, function () {\n    return {\n      forceAlign: function forceAlign() {},\n      getElement: function getElement() {\n        return elementRef.current;\n      }\n    };\n  }); // ======================== Render ========================\n\n  var mergedStyle = _objectSpread({\n    zIndex: zIndex\n  }, popupStyle);\n\n  var childNode = children; // Wrapper when multiple children\n\n  if (React.Children.count(children) > 1) {\n    childNode = /*#__PURE__*/React.createElement(\"div\", {\n      className: \"\".concat(prefixCls, \"-content\")\n    }, children);\n  } // Mobile support additional render\n\n\n  if (popupRender) {\n    childNode = popupRender(childNode);\n  }\n\n  return /*#__PURE__*/React.createElement(CSSMotion, _extends({\n    visible: visible,\n    ref: elementRef,\n    removeOnLeave: true\n  }, popupMotion), function (_ref, motionRef) {\n    var motionClassName = _ref.className,\n        motionStyle = _ref.style;\n    var mergedClassName = classNames(prefixCls, popupClassName, motionClassName);\n    return /*#__PURE__*/React.createElement(\"div\", {\n      ref: motionRef,\n      className: mergedClassName,\n      onClick: onClick,\n      style: _objectSpread(_objectSpread({}, motionStyle), mergedStyle)\n    }, childNode);\n  });\n});\nMobilePopupInner.displayName = 'MobilePopupInner';\nexport default MobilePopupInner;"],"mappings":"AAAA,OAAOA,QAAQ,MAAM,oCAAoC;AACzD,OAAOC,aAAa,MAAM,0CAA0C;AACpE,OAAO,KAAKC,KAAK,MAAM,OAAO;AAC9B,OAAOC,SAAS,MAAM,WAAW;AACjC,OAAOC,UAAU,MAAM,YAAY;AACnC,IAAIC,gBAAgB,GAAG,aAAaH,KAAK,CAACI,UAAU,CAAC,UAAUC,KAAK,EAAEC,GAAG,EAAE;EACzE,IAAIC,SAAS,GAAGF,KAAK,CAACE,SAAS;IAC3BC,OAAO,GAAGH,KAAK,CAACG,OAAO;IACvBC,MAAM,GAAGJ,KAAK,CAACI,MAAM;IACrBC,QAAQ,GAAGL,KAAK,CAACK,QAAQ;IACzBC,aAAa,GAAGN,KAAK,CAACO,MAAM;EAChCD,aAAa,GAAGA,aAAa,KAAK,KAAK,CAAC,GAAG,CAAC,CAAC,GAAGA,aAAa;EAC7D,IAAIE,cAAc,GAAGF,aAAa,CAACE,cAAc;IAC7CC,UAAU,GAAGH,aAAa,CAACG,UAAU;IACrCC,qBAAqB,GAAGJ,aAAa,CAACK,WAAW;IACjDA,WAAW,GAAGD,qBAAqB,KAAK,KAAK,CAAC,GAAG,CAAC,CAAC,GAAGA,qBAAqB;IAC3EE,WAAW,GAAGN,aAAa,CAACM,WAAW;IACvCC,OAAO,GAAGb,KAAK,CAACa,OAAO;EAC3B,IAAIC,UAAU,GAAGnB,KAAK,CAACoB,MAAM,EAAE,CAAC,CAAC;;EA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